<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title></title>
		<link href="../css/mui.min.css" rel="stylesheet" />
		<link href="../css/together.css" rel="stylesheet" />
		<link rel="stylesheet" type="text/css" href="../css/general.css"/>
		<style>
			ul {
				font-size: 14px;
				color: #8f8f94;
			}
			.mui-btn {
				padding: 10px;
			}
			.mui-table-view-cell>a:not(.mui-btn){
				margin:0;
			}
			
			.mui-content>.mui-table-view:first-child {
			    margin-top: 0;
			}
			.nullbook{
				width: 100%;
				padding-top: 40%;
				text-align: center;
			}
			.bookdiv{
				width: 50%;
				padding: 0.5em;
			}
			.flex-jcfs-aicent-fwwrap{
			    display: flex;
			    justify-content: flex-start;
			    align-items: flex-start;
			    flex-wrap: wrap;
			}
			.bookdiv>img{
				width: 100%;
				
			}
			.datadiv{
				display: flex;
				align-items: center;
				justify-content: center;
				flex-direction: column;
			}
			.redcolor{
				color: red;
			}
		</style>
	</head>

	<body>
		
		<header class="mui-bar mui-bar-nav m_barC">
            <a class="mui-action-back  mui-icon mui-icon-left-nav mui-pull-left"></a>
		    <h1 class="mui-title">我的书籍</h1>
		</header>
		<div class="mui-content ws_content ws_make flex-jcfs-aicent-fwwrap" id="ulmain">
			<div class="bookdiv">
				<img src="../images/b4-min.jpg"/>
				<div class="datadiv">
					<span class="fe09">
						书名
					</span>
					<span class="fe09">
						书名
					</span>
				</div>
			</div>
    		
               
                <!--
                	作者：592176224@qq.com
                	时间：2018-12-13
                	描述：
               <li class=" ">
                    <a href="#" class="flex2">
                    	<img src="../images/books_bg.png" alt="" />
                    	<div class="make_title">
	                    	<span>我的旅行</span>
	                      	<div>用户名</div> 
                       </div>
                    </a>
                </li> 
                   <li class="">
                    <a href="#" class="flex2">
                    	<img src="../images/logo.png" alt="" />
                    	<div class="make_title">
	                    	<span>我的旅行</span>
	                      	<div>用户名</div> 
                       </div>
                    </a>
                </li> 
                    </ul>
               -->
                
          
            
           
            
		</div>
		<script src="../js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="../js/req.js" type="text/javascript" charset="utf-8"></script>
		<script src="../js/mui.min.js"></script>
		<script src="../js/muishow.js" type="text/javascript" charset="utf-8"></script>
		<script src="../js/app.js"></script>
		<script type="text/javascript">
			var pagenum = 1;
			window.onload = function (){
				getbooks();
				
			}
			
			
			function getbooks(){
				let data ={
					url:"/api/Book/user_shop_book_list",
					data:{
						access_token:acctoken()||"",
						page:pagenum,
					}
				}
				ajax(data,function(res){
							console.log(res);
							if(res.code == -1){
								mui.toast(res.message);
							}
							if(res.code == 1){
								let booklist = res.data[0].book_list;
								let booklistreview = res.data[0].book_list_review;
								let umain = g("ulmain");
								if(booklist.length>0){
									let str = '';
									for (let i = 0; i < booklist.length;i++) {
										str += '<div class="bookdiv">'+
											'<img src="'+booklist[i].book_image+'"/>'+
											'<div class="datadiv"><div class="fe09">'+
											booklist[i].title+'||'+booklist[i].nickname+
												'</div><div class="fe09">'+
											booklist[i].page_total+'页||<span class="redcolor"> ￥'+booklist[i].price+'</span>'+
												'</div></div></div>';
									}
									umain.innerHTML = str;
								}else{
									let str = " <div class='nullbook'>暂无书籍</div>"
									umain.innerHTML = str;
								}
							}
						});
			}
			
		</script>
	</body>

</html>